package com.消除ifelse.策略工厂方式;

import org.springframework.stereotype.Service;

import javax.annotation.PostConstruct;

/**
 * @Date 2021/1/14 17:01
 * @Author WangLinBao
 * @Description
 */
@Service("2222")
public class AliaPay implements IPay{
    @Override
    public void pay() {
        System.out.println("支付宝支付");
    }

    @PostConstruct
    public void init(){
        PayStrategyFactory.register("alia111",this);
    }

}
